package com.graducationdesign.springboot.controller.Student;

import com.graducationdesign.springboot.entities.Administrator.PersonnalInformationMoudle.Student;
import com.graducationdesign.springboot.mapper.AllGraducationDesignMapper;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author Mr.zhneg
 * @create 2020-02-02-21:15
 */
@Controller
public class PersonInformationForStuController {
    org.slf4j.Logger logger=  LoggerFactory.getLogger(getClass());
    @Autowired
    AllGraducationDesignMapper allGraducationDesignMapper;

    @GetMapping("/infomation")
    public String list(Map<String,Object> map, HttpServletRequest request){

        logger.info("学生个人信息查看：");
        Object name=request.getSession().getAttribute("loginUser");
        Student student=allGraducationDesignMapper.personInformationForStu(name);
        map.put("student",student);

        return "Student/personnalMoudle/personnalinformation";
    }
}
